/* iOS-like styles for Atomic Habits App */
:root {
  --primary-color: #007AFF;
  --secondary-color: #5AC8FA;
  --success-color: #4CD964;
  --danger-color: #FF3B30;
  --warning-color: #FFCC00;
  --text-color: #000000;
  --text-secondary: #8E8E93;
  --background-color: #F2F2F7;
  --card-color: #FFFFFF;
  --border-color: #E5E5EA;
  --ios-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--ios-font);
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 390px; /* iPhone 12/13 width */
  margin: 0 auto;
  background-color: white;
  height: 844px; /* iPhone 12/13 height */
  position: relative;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.screen-container {
  padding: 15px;
  padding-top: 60px; /* Space for status bar and nav bar */
}

/* Status bar */
.status-bar {
  height: 44px;
  background-color: var(--card-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  position: fixed;
  top: 0;
  width: 360px;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.status-bar .time {
  font-weight: 600;
}

.status-bar .icons {
  display: flex;
  gap: 5px;
}

/* Navigation bar */
.nav-bar {
  height: 50px;
  background-color: var(--card-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  position: fixed;
  top: 44px;
  width: 360px;
  z-index: 999;
  border-bottom: 1px solid var(--border-color);
}

.nav-bar .title {
  font-size: 17px;
  font-weight: 600;
}

.nav-bar .back {
  color: var(--primary-color);
}

.nav-bar .action {
  color: var(--primary-color);
}

/* Tab bar */
.tab-bar {
  height: 83px;
  background-color: var(--card-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  width: 390px;
  z-index: 999;
  border-top: 1px solid var(--border-color);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.tab-item.active {
  color: var(--primary-color);
}

.tab-item i {
  font-size: 24px;
  margin-bottom: 4px;
}

.tab-item span {
  font-size: 10px;
}

/* Cards */
.card {
  background-color: var(--card-color);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-bottom: 15px;
}

/* Lists */
.list-group {
  background-color: var(--card-color);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.list-item {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item .title {
  font-weight: 400;
}

.list-item .chevron {
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.3s;
  text-decoration: none;
}

.btn:active {
  opacity: 0.7;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-outline {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Form elements */
.form-group {
  margin-bottom: 15px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-family: var(--ios-font);
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: none;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238E8E93' d='M6 8L0 2h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

/* Switch (Toggle) */
.switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E5E5EA;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--success-color);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Progress bar */
.progress {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 4px;
}

/* Chart placeholders */
.chart-placeholder {
  width: 100%;
  height: 200px;
  background-color: var(--background-color);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
}

.badge-success {
  background-color: var(--success-color);
  color: white;
}

.badge-warning {
  background-color: var(--warning-color);
  color: black;
}

.badge-danger {
  background-color: var(--danger-color);
  color: white;
}

/* Avatar */
.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Calendar day circles */
.calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 15px 0;
}

.calendar-day {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

.calendar-day.completed {
  background-color: var(--success-color);
  color: white;
}

.calendar-day.missed {
  background-color: var(--danger-color);
  color: white;
}

.calendar-day.future {
  background-color: var(--background-color);
  color: var(--text-secondary);
}

/* Habit streak */
.streak {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-color);
}

.streak i {
  color: var(--warning-color);
}

/* Utility classes */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary-color);
}

.text-success {
  color: var(--success-color);
}

.text-danger {
  color: var(--danger-color);
}

.text-secondary {
  color: var(--text-secondary);
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.flex {
  display: flex;
}

.flex-between {
  justify-content: space-between;
}

.flex-center {
  justify-content: center;
  align-items: center;
}

.flex-column {
  flex-direction: column;
}

.gap-10 {
  gap: 10px;
}

.gap-20 {
  gap: 20px;
}

/* Gallery specific styles */
.gallery-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px;
}

.gallery-title {
  text-align: center;
  margin-bottom: 40px;
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 30px;
}

.screen-preview {
  border: 1px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.screen-preview h3 {
  margin: 0;
  padding: 15px;
  background-color: var(--primary-color);
  color: white;
}

.screen-preview iframe {
  width: 100%;
  height: 700px;
  border: none;
}
